package com.svms.save.services;

import java.util.ArrayList;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import com.svms.save.vo.GroupByVo;

public abstract class IndexService {
	@Autowired
	private SvdaRydaxxService rydaxxManager;
	@Autowired
	private SvdaZwxxxService zwxManager;
	
	public List<GroupByVo> ztqkCount(){
		List<GroupByVo> list = new ArrayList<GroupByVo>();
		long rydaCount = rydaxxManager.countAllRyda();
		GroupByVo ryda = new GroupByVo();
		ryda.setType("RYDACOUNT");
		ryda.setTitle("档案总数");
		ryda.setNum(rydaCount);
		long zwxCount = zwxManager.countAllZwx();
		GroupByVo zwx = new GroupByVo();
		zwx.setType("ZWXCOUNT");
		zwx.setTitle("储存格位");
		zwx.setNum(zwxCount);
		List<GroupByVo> ztList = rydaxxManager.groupByDaryzt();
		list.add(ryda);
		list.add(zwx);
		list.addAll(ztList);
		return list;
	}
	
	public List<GroupByVo> gdwCount(){
		List<GroupByVo> list = rydaxxManager.groupBySsjg();
		return list;
	}
	
	public List<GroupByVo> glechars(){
		List<GroupByVo> list = rydaxxManager.groupByLeftSsjg();
		return list;
	}
}
